import ZMasonryWall from "./zpkgs/components/z-masonry-wall/ZMasonryWall";
import ZDescriptions from "@/zpkgs/components/z-descriptions/ZDescriptions";
import ZDescriptionsItem from "@/zpkgs/components/z-descriptions/ZDescriptionsItem";
import ZPageDesign from "@/zpkgs/components/z-pages/ZPageDesign";
import ZComGridView from "@/zpkgs/components/z-datatable/ZComGridView";
import ZComGrid from "@/zpkgs/components/z-datatable/ZComGrid";
import ZDescriptionsGrid from "@/zpkgs/components/z-descriptions/ZDescriptionsGrid";
import ZEllipsis from "@/zpkgs/components/z-ellipsis/ZEllipsis";
import ZInputTag from "@/zpkgs/components/z-form/ZInputTag";
import ZQuillEditor from "@/zpkgs/components/z-editor/ZQuillEditor";
import {installExtCus} from "@/zpkgs/components/z-form/cus";
import ZDataGridV2 from "@/zpkgs/components/z-data-grid/ZDataGridV2";

import {installDirectives} from "@/zpkgs/directive";
// import ZComment from "@/zpkgs/components/z-comment";

import InputFacade from 'vue-input-facade'
import ZFacadeInput from "@/zpkgs/components/z-form/ZFacadeInput";
import ZDirectorySelect from "@/zpkgs/components/z-select/ZDirectorySelect";
import {installZDraggableResizable} from "@/zpkgs/components/z-drag-resize";

import {installZChart} from "@/zpkgs/components/z-chart/glo";

export function installExtCom(Vue, {autoInputFacade = true} = {}) {
  installZChart(Vue)
  installZDraggableResizable(Vue);
  if (autoInputFacade) {
    Vue.use(InputFacade)
  }
  installDirectives(Vue);
  // Vue.component(ZComment.name, ZComment);
  Vue.component(ZDirectorySelect.name, ZDirectorySelect);
  Vue.component(ZMasonryWall.name, ZMasonryWall);
  Vue.component(ZDescriptionsItem.name, ZDescriptionsItem);
  Vue.component(ZDataGridV2.name, ZDataGridV2);
  Vue.component(ZDescriptions.name, ZDescriptions);
  Vue.component(ZInputTag.name, ZInputTag);
  Vue.component(ZQuillEditor.name, ZQuillEditor);
  Vue.component(ZDescriptionsGrid.name, ZDescriptionsGrid);
  Vue.component(ZEllipsis.name, ZEllipsis);
  Vue.component(ZFacadeInput.name, ZFacadeInput);
  Vue.component(ZPageDesign.name, ZPageDesign);
  Vue.component(ZComGridView.name, ZComGridView);
  Vue.component(ZComGrid.name, ZComGrid);
  installExtCus()
  return {
    InputFacade
  }
}
